<!doctype html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<title>Bidi Mobile test - StoreCarousel</title>

	<script type="text/javascript" src="../../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','Carousel','PageIndicator']"></script>
	<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, mblAlwaysHideAddressBar: true,  has: { 'dojo-bidi': true }"></script>


<script type="text/javascript">
		require([
			"dojo/_base/connect",
			"dojo/ready",
			"dojo/_base/array",
			"dojo/dom",
			"dijit/registry",
			"dojo/store/JsonRest",
			"dojo/dom",
			"dojox/mobile/ScrollableView",
			"dojox/mobile/StoreCarousel",			
			"dojox/mobile/Carousel",
			"dojox/mobile/Button",
			"dijit/_base/manager",
			"dojox/mobile/parser",
			"dojox/mobile",
			"dojox/mobile/compat"
		],
		
		function(connect, ready, array, dom, registry, JsonRest){
			store1 = new JsonRest({target: "./Bidi_carousel-categ.json"});
			ready(function(){
			
				
				//change label 
				var btn1 = registry.byId("btnlbl");
				btn1.connect(btn1, "onClick", function(){
					registry.byId("carousel11").set("title", "Start \u05e9\u05dc\u05d5\u05dd!	");	
				registry.byId("carousel12").set("title", "\u05e9\u05dc\u05d5\u05dd End!	");			
				});
			
				//change textDir for carousel4	
				var btn0 = registry.byId("btn0");	
				btn0.connect(btn0, "onClick", function(){
					registry.byId("carousel4").set("textDir", "ltr");
				});	
				
				var btn0 = registry.byId("btn1");	
				btn0.connect(btn0, "onClick", function(){
					registry.byId("carousel4").set("textDir", "rtl");
				});	
					
				var btn0 = registry.byId("btn2");	
				btn0.connect(btn0, "onClick", function(){
					registry.byId("carousel4").set("textDir", "auto");
				});
			});
			
			
		});
		
	</script>  
	  

<script type="text/javascript">
		require(
		function(JsonRest){
			store1 = new JsonRest({target: "../data/Bidi_carousel-categ.json"});
		}); 
		
		</script>


	<style>
	html,body {
		height: 100%;
		overflow: hidden;
	}
	hr {
		border: none;
		margin: 0;
	}
	
	</style>
	
	
</head>
	
<body style="visibility:hidden;">
<div id="group1" data-dojo-type="dojox.mobile.View" data-dojo-props='keepScrollPos:false'><!-- keepScrollPos=false is to improve performance -->

	<div id="view0" data-dojo-type="dojox.mobile.ScrollableView">
	        <h2 data-dojo-type="dojox.mobile.Heading">StoredCarousel widget</h2>
		<h1 data-dojo-type="dojox.mobile.Heading">dir LTR</h1>	
		<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
			<li id="l1" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/LTR.png", moveTo:"view1"'>Tex Dir LTR</li>
			<li id="l2" data-dojo-type="dojox.mobile.ListItem" data-dojo-props='icon:"../images/RTL.png", moveTo:"view2"'>Tex Dir RTL</li>
			<li id="l3" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/auto.png", moveTo:"view3"'>Tex Dir AUTO</li>
		</ul>
		<h1 data-dojo-type="dojox.mobile.Heading">dir RTL</h1>
		<ul data-dojo-type="dojox.mobile.EdgeToEdgeList" >
			<li id="l4" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/LTR.png", moveTo:"view4"'>Tex Dir LTR</li>
			<li id="l5" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/RTL.png", moveTo:"view5"'>Tex Dir RTL</li>
			<li id="l6" data-dojo-type="dojox.mobile.ListItem"  data-dojo-props='icon:"../images/auto.png", moveTo:"view6"'>Tex Dir AUTO</li>
		</ul>	
	</div>	
	
	
	<div id="view1" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir LTR</h1>
		
			
		<div id="foo1" data-dojo-type="dojox.mobile.View">
			<div id="carousel1" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel2" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel3" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel4" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
		</div>
		
		<button data-dojo-type="dojox.mobile.Button" id="btn0" >Set textDir for Carousel to ltr</button>
			<button data-dojo-type="dojox.mobile.Button" id="btn1" >Set textDir for Carousel to rtl</button>
			<button data-dojo-type="dojox.mobile.Button" id="btn2" >Set textDir for Carousel to auto</button>
	
	</div>
	
		
	<div id="view2" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir RTL</h1>
			<div id="carousel5" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel6" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel7" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel8" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
					
		
	</div>
		
	<div id="view3" data-dojo-type="dojox.mobile.ScrollableView">	
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir LTR | textDir AUTO</h1>
			<div id="carouse9" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel0" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel11" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel12" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
				
		<button data-dojo-type="dojox.mobile.Button" id="btnlbl" >Set new text Button for carousel</button>
		
	</div>	
	 
	 
	<div  id="view4" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir LTR</h1>
		<div id="foo2" data-dojo-type="dojox.mobile.View">
			<div id="carousel13" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel14" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel15" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel16" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "ltr", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
			
		</div>
		
	</div>
	
	<div id="view5" data-dojo-type="dojox.mobile.ScrollableView">
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir RTL</h1>
			<div id="carousel17" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel18" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel19" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel20" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "rtl", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
			
		
		
	</div>	
	
	<div id="view6" data-dojo-type="dojox.mobile.ScrollableView">	
		<h1 data-dojo-type="dojox.mobile.Heading" data-dojo-props='back:"Back", moveTo:"view0"'>Dir RTL | textDir AUTO</h1>
			<div id="carousel21" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello world!"'></div>
			<div id="carousel22" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel23" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"Hello &#1506;&#1493;&#1500;&#1501;!"'></div>
			<div id="carousel24" dir="rtl" data-dojo-type="dojox.mobile.StoreCarousel"
			data-dojo-props='textDir: "auto", height:"150px", navButton:true, store:store1, numVisible:"1", title:"&#1513;&#1500;&#1493;&#1501; World!"'></div>
			
		
		
	</div>	


</div>
</body>
</html>
